package com.zlict.admin.service.impl;

import java.util.List;
import com.zlict.common.utils.DateUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zlict.admin.mapper.ProjectIntangibleWorkingHoursMapper;
import com.zlict.admin.domain.ProjectIntangibleWorkingHours;
import com.zlict.admin.service.IProjectIntangibleWorkingHoursService;

/**
 * 项目无形资产工时Service业务层处理
 * 
 * @author lqh
 * @date 2025-06-30
 */
@Service
@RequiredArgsConstructor
public class ProjectIntangibleWorkingHoursServiceImpl implements IProjectIntangibleWorkingHoursService 
{
    private final ProjectIntangibleWorkingHoursMapper projectIntangibleWorkingHoursMapper;

    /**
     * 查询项目无形资产工时
     * 
     * @param id 项目无形资产工时主键
     * @return 项目无形资产工时
     */
    @Override
    public ProjectIntangibleWorkingHours selectProjectIntangibleWorkingHoursById(String id)
    {
        return projectIntangibleWorkingHoursMapper.selectProjectIntangibleWorkingHoursById(id);
    }

    /**
     * 查询项目无形资产工时列表
     * 
     * @param projectIntangibleWorkingHours 项目无形资产工时
     * @return 项目无形资产工时
     */
    @Override
    public List<ProjectIntangibleWorkingHours> selectProjectIntangibleWorkingHoursList(ProjectIntangibleWorkingHours projectIntangibleWorkingHours)
    {
        return projectIntangibleWorkingHoursMapper.selectProjectIntangibleWorkingHoursList(projectIntangibleWorkingHours);
    }

    /**
     * 新增项目无形资产工时
     * 
     * @param projectIntangibleWorkingHours 项目无形资产工时
     * @return 结果
     */
    @Override
    public int insertProjectIntangibleWorkingHours(ProjectIntangibleWorkingHours projectIntangibleWorkingHours)
    {
        projectIntangibleWorkingHours.setCreateTime(DateUtils.getNowDate());
        return projectIntangibleWorkingHoursMapper.insertProjectIntangibleWorkingHours(projectIntangibleWorkingHours);
    }

    /**
     * 修改项目无形资产工时
     * 
     * @param projectIntangibleWorkingHours 项目无形资产工时
     * @return 结果
     */
    @Override
    public int updateProjectIntangibleWorkingHours(ProjectIntangibleWorkingHours projectIntangibleWorkingHours)
    {
        projectIntangibleWorkingHours.setUpdateTime(DateUtils.getNowDate());
        return projectIntangibleWorkingHoursMapper.updateProjectIntangibleWorkingHours(projectIntangibleWorkingHours);
    }

    /**
     * 批量删除项目无形资产工时
     * 
     * @param ids 需要删除的项目无形资产工时主键
     * @return 结果
     */
    @Override
    public int deleteProjectIntangibleWorkingHoursByIds(String[] ids)
    {
        return projectIntangibleWorkingHoursMapper.deleteProjectIntangibleWorkingHoursByIds(ids);
    }

    /**
     * 删除项目无形资产工时信息
     * 
     * @param id 项目无形资产工时主键
     * @return 结果
     */
    @Override
    public int deleteProjectIntangibleWorkingHoursById(String id)
    {
        return projectIntangibleWorkingHoursMapper.deleteProjectIntangibleWorkingHoursById(id);
    }
}
